package com.last1mile.model;

import java.util.Calendar;
import java.util.Date;

import com.last1mile.pojo.ServeReserveDO;


public class ReserveView {
    private ServeReserveDO reserveDo;
    private String perName;
    private Calendar cal= Calendar.getInstance();
        
    public void setReserveDo(ServeReserveDO reserveDo) {
        this.reserveDo = reserveDo;
    }
    
    public void setPerName(String perName) {
        this.perName = perName;
    }
    
    public String getReserveTitle(){
        return this.perName;
    }
    
    public Date getReserveBeginTime(){
        return this.reserveDo.getBeginTime();
    }
    
    public int getBeginTimeYear(){
        cal.setTime(this.reserveDo.getBeginTime());
        return cal.get(Calendar.YEAR);
    }
    
    public int getBeginTimeMonth(){
        cal.setTime(this.reserveDo.getBeginTime());
        return cal.get(Calendar.MONTH);
    }
    
    public int getBeginTimeDate(){
        cal.setTime(this.reserveDo.getBeginTime());
        return cal.get(Calendar.DATE);
    }
    
    public int getBeginTimeHour(){
        cal.setTime(this.reserveDo.getBeginTime());
        return cal.get(Calendar.HOUR_OF_DAY);
    }
    
    public int getBeginTimeMinute(){
        cal.setTime(this.reserveDo.getBeginTime());
        return cal.get(Calendar.MINUTE);
    }
    
    
    public Date getReserveEndTime(){
        return this.reserveDo.getEndTime(); 
    }
    
    public int getEndTimeYear(){
        cal.setTime(this.reserveDo.getEndTime());
        return cal.get(Calendar.YEAR);
    }
    
    public int getEndTimeMonth(){
        cal.setTime(this.reserveDo.getEndTime());
        return cal.get(Calendar.MONTH);
    }
    
    public int getEndTimeDate(){
        cal.setTime(this.reserveDo.getEndTime());
        return cal.get(Calendar.DATE);
    }
    
    public int getEndTimeHour(){
        cal.setTime(this.reserveDo.getEndTime());
        return cal.get(Calendar.HOUR_OF_DAY);
    }
    
    public int getEndTimeMinute(){
        cal.setTime(this.reserveDo.getEndTime());
        return cal.get(Calendar.MINUTE);
    }
    
    public Integer getReserveId(){
        return this.reserveDo.getId();
    }
    
    public boolean getAllDay(){
        return this.reserveDo.getAllDay();
    }

    
}
